const stores = {
    state:{
        tabShow:true,
        selectIndex:0
    },
    mutations:{
       changeTabShow(state, show){
          return {...state, tabShow:show};
       },
       changeSelectIndex(state, index){
         return {...state, selectIndex:index-1};
       }
    },
    actions:{
       tabShowAction(dispatch, show){
            dispatch({
                type:"changeTabShow",
                params:show
            });
       },
       selectIndexAction(dispatch, index){
            dispatch({
                type:"changeSelectIndex",
                params:index
            });
       } 
    }
}

export default stores;